From 8c0b1697e6ae3167b0898233e2fddc7c2e7a7155 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 May 2014 00:17:23 -0400 Subject: [PATCH] inspector: string fixes Mark user-visible strings for translation in the new property editor. --- gtk/inspector/prop-editor.c | 12 +++++++----- po/POTFILES.in | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 01de8acc55..91562b4793 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -15,6 +15,8 @@ * License along with this library. If not, see . */ +#include "config.h" +#include #include "prop-editor.h" #include "widget-tree.h" @@ -589,7 +591,7 @@ pointer_changed (GObject *object, GParamSpec *pspec, gpointer data) g_object_get (object, pspec->name, &ptr, NULL); - str = g_strdup_printf ("Pointer: %p", ptr); + str = g_strdup_printf (_("Pointer: %p"), ptr); gtk_label_set_text (label, str); g_free (str); } @@ -604,8 +606,8 @@ object_label (GObject *obj, GParamSpec *pspec) else if (pspec) name = g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)); else - name = "unknown"; - return g_strdup_printf ("Object: %p (%s)", obj, name); + name = C_("type name", "Unknown"); + return g_strdup_printf (_("Object: %p (%s)"), obj, name); } static void @@ -975,7 +977,7 @@ property_widget (GObject *object, prop_edit = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); label = gtk_label_new (""); - button = gtk_button_new_with_label ("Properties"); + button = gtk_button_new_with_label (_("Properties")); g_signal_connect_swapped (button, "clicked", G_CALLBACK (object_properties), editor); @@ -1029,7 +1031,7 @@ property_widget (GObject *object, } else { - msg = g_strdup_printf ("uneditable property type: %s", + msg = g_strdup_printf (_("Uneditable property type: %s"), g_type_name (G_PARAM_SPEC_TYPE (spec))); prop_edit = gtk_label_new (msg); g_free (msg); diff --git a/po/POTFILES.in b/po/POTFILES.in index add5372fb0..fcb52c3bb2 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -279,6 +279,7 @@ gtk/inspector/general.ui.h gtk/inspector/inspect-button.c gtk/inspector/object-hierarchy.ui.h gtk/inspector/prop-list.ui.h +gtk/inspector/prop-editor.c gtk/inspector/resource-list.ui.h gtk/inspector/signals-list.c gtk/inspector/signals-list.ui.h -- 2.30.2